#pragma once
#include <d3d9.h>
#include <d3dx9.h>

class Sprite
{
public:
	Sprite(void);
	Sprite(LPDIRECT3DTEXTURE9 texture, int width, int height, int count, int spritePerRow);
	~Sprite(void);

	LPDIRECT3DTEXTURE9 _texture;
	int _index;
	int _width;
	int _height;
	int _count;
	int _spritePerRow;
	void Next();
	void Next(int start, int end);
	void Reset();
	void Reset(int t);// reset ve sprite thu t
	void Render(int x, int y);
	void Render(LPDIRECT3DSURFACE9 target, int x, int y);
	void Render(LPDIRECT3DSURFACE9 target, int x, int y, int vpx, int vpy);
	void Render( int x, int y, int vpx, int vpy);
	void Rendertile(LPDIRECT3DSURFACE9 target, int x, int y);
};

